#!/bin/bash -e

# save these for use in the post-refresh hook
snapctl set pre-refresh.revision=$SNAP_REVISION
snapctl set pre-refresh.version=$SNAP_VERSION

# unset legacy EdgeX <2.3 options
snapctl unset lastrev release

 # back up the Kong database, so that if the new snap contains a newer
 # postgresql, then the configuration can be imported into the new database
 # in the post-refresh hook.
$SNAP/bin/kong-postgres-setup.sh "pre-refresh"
